3.5 \(\int \frac{(d+i c d x) (a+b \tan ^{-1}(c x))}{x} \, dx\)

Optimal. Leaf size=76 \[ \frac{1}{2} i b d \text{PolyLog}(2,-i c x)-\frac{1}{2} i b d \text{PolyLog}(2,i c x)+i a c d x+a d \log (x)-\frac{1}{2} i b d \log \left (c^2 x^2+1\right )+i b c d x \tan ^{-1}(c x) \]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

________________________________________________________________________________________

Rubi [A]  time = 0.0858881, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {4876, 4846, 260, 4848, 2391} \[ \frac{1}{2} i b d \text{PolyLog}(2,-i c x)-\frac{1}{2} i b d \text{PolyLog}(2,i c x)+i a c d x+a d \log (x)-\frac{1}{2} i b d \log \left (c^2 x^2+1\right )+i b c d x \tan ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Int[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x,x]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

Rule 4876

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[Ex
pandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p,
 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{(d+i c d x) \left (a+b \tan ^{-1}(c x)\right )}{x} \, dx &=\int \left (i c d \left (a+b \tan ^{-1}(c x)\right )+\frac{d \left (a+b \tan ^{-1}(c x)\right )}{x}\right ) \, dx\\ &=d \int \frac{a+b \tan ^{-1}(c x)}{x} \, dx+(i c d) \int \left (a+b \tan ^{-1}(c x)\right ) \, dx\\ &=i a c d x+a d \log (x)+\frac{1}{2} (i b d) \int \frac{\log (1-i c x)}{x} \, dx-\frac{1}{2} (i b d) \int \frac{\log (1+i c x)}{x} \, dx+(i b c d) \int \tan ^{-1}(c x) \, dx\\ &=i a c d x+i b c d x \tan ^{-1}(c x)+a d \log (x)+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)-\left (i b c^2 d\right ) \int \frac{x}{1+c^2 x^2} \, dx\\ &=i a c d x+i b c d x \tan ^{-1}(c x)+a d \log (x)-\frac{1}{2} i b d \log \left (1+c^2 x^2\right )+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)\\ \end{align*}

Mathematica [A]  time = 0.0044113, size = 76, normalized size = 1. \[ \frac{1}{2} i b d \text{PolyLog}(2,-i c x)-\frac{1}{2} i b d \text{PolyLog}(2,i c x)+i a c d x+a d \log (x)-\frac{1}{2} i b d \log \left (c^2 x^2+1\right )+i b c d x \tan ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x,x]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 113, normalized size = 1.5 \begin{align*} iacdx+ad\ln \left ( cx \right ) +ibcdx\arctan \left ( cx \right ) +db\arctan \left ( cx \right ) \ln \left ( cx \right ) +{\frac{i}{2}}db\ln \left ( cx \right ) \ln \left ( 1+icx \right ) -{\frac{i}{2}}db\ln \left ( cx \right ) \ln \left ( 1-icx \right ) +{\frac{i}{2}}db{\it dilog} \left ( 1+icx \right ) -{\frac{i}{2}}db{\it dilog} \left ( 1-icx \right ) -{\frac{i}{2}}bd\ln \left ({c}^{2}{x}^{2}+1 \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+I*c*d*x)*(a+b*arctan(c*x))/x,x)

[Out]

I*a*c*d*x+a*d*ln(c*x)+I*b*c*d*x*arctan(c*x)+d*b*arctan(c*x)*ln(c*x)+1/2*I*d*b*ln(c*x)*ln(1+I*c*x)-1/2*I*d*b*ln
(c*x)*ln(1-I*c*x)+1/2*I*d*b*dilog(1+I*c*x)-1/2*I*d*b*dilog(1-I*c*x)-1/2*I*b*d*ln(c^2*x^2+1)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} i \, a c d x + \frac{1}{2} i \,{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d + b d \int \frac{\arctan \left (c x\right )}{x}\,{d x} + a d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="maxima")

[Out]

I*a*c*d*x + 1/2*I*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*d + b*d*integrate(arctan(c*x)/x, x) + a*d*log(x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{2 i \, a c d x + 2 \, a d -{\left (b c d x - i \, b d\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{2 \, x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="fricas")

[Out]

integral(1/2*(2*I*a*c*d*x + 2*a*d - (b*c*d*x - I*b*d)*log(-(c*x + I)/(c*x - I)))/x, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} d \left (\int \frac{a}{x}\, dx + \int i a c\, dx + \int \frac{b \operatorname{atan}{\left (c x \right )}}{x}\, dx + \int i b c \operatorname{atan}{\left (c x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*atan(c*x))/x,x)

[Out]

d*(Integral(a/x, x) + Integral(I*a*c, x) + Integral(b*atan(c*x)/x, x) + Integral(I*b*c*atan(c*x), x))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (i \, c d x + d\right )}{\left (b \arctan \left (c x\right ) + a\right )}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="giac")

[Out]

integrate((I*c*d*x + d)*(b*arctan(c*x) + a)/x, x)